﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Scheduling_ScheduledTaskRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Scheduling_ScheduledTaskRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Scheduling_ScheduledTaskRecord() : base("Scheduling_ScheduledTaskRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _TaskType = "TaskType";
        public RaisingStudio.Data.Expressions.ColumnExpression TaskType { get { return _TaskType; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ScheduledUtc = "ScheduledUtc";
        public RaisingStudio.Data.Expressions.ColumnExpression ScheduledUtc { get { return _ScheduledUtc; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ContentItemVersionRecord_id = "ContentItemVersionRecord_id";
        public RaisingStudio.Data.Expressions.ColumnExpression ContentItemVersionRecord_id { get { return _ContentItemVersionRecord_id; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Scheduling_ScheduledTaskRecord Scheduling_ScheduledTaskRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Scheduling_ScheduledTaskRecord Scheduling_ScheduledTaskRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Scheduling_ScheduledTaskRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Scheduling_ScheduledTaskRecord Scheduling_ScheduledTaskRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Scheduling_ScheduledTaskRecord.Id,
                            Scheduling_ScheduledTaskRecord.TaskType,
                            Scheduling_ScheduledTaskRecord.ScheduledUtc,
                            Scheduling_ScheduledTaskRecord.ContentItemVersionRecord_id,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Scheduling_ScheduledTaskRecord>(_Scheduling_ScheduledTaskRecord Scheduling_ScheduledTaskRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Scheduling_ScheduledTaskRecord>(Scheduling_ScheduledTaskRecord);
        }


        #region IQueryExpression<_Scheduling_ScheduledTaskRecord> 成员

        _Scheduling_ScheduledTaskRecord RaisingStudio.Data.Expressions.IQueryExpression<_Scheduling_ScheduledTaskRecord>.Value
        {
            get { return Scheduling_ScheduledTaskRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Scheduling_ScheduledTaskRecord
    {
        #region Members
        public static readonly _Scheduling_ScheduledTaskRecord _ = new _Scheduling_ScheduledTaskRecord();
		#endregion
    }
}
